import 'package:flutter/material.dart';
import 'package:flutter_tencentplayer/flutter_tencentplayer.dart';
import 'package:loading_indicator_view/loading_indicator_view.dart';


class TencentPlayerLoading extends StatelessWidget {
  final TencentPlayerController controller;
  final double iconW;

  TencentPlayerLoading({this.controller, this.iconW});

  @override
  Widget build(BuildContext context) {
    if (!controller.value.initialized && controller.value.errorDescription == null) {
    } else if (controller.value.errorDescription != null) {
    } else if(controller.value.isLoading) {
      return Center(
          child: BallPulseIndicator(
            ballColor: Colors.white,
            spacing: 2,
            minRadius: 2,
            maxRadius: 4,
          )
      );
    }
    if (!controller.value.initialized || controller.value.errorDescription != null || controller.value.isLoading) {
      return SizedBox();
    } else {
      return SizedBox();
    }
  }
}

